#include<iostream>

using namespace std;
const int N = 1e7 + 10;
int n,x;
int arr[N];
int main()
{
    
    cin>>n>>x;
    
    for(int i =1;i<n;i++) cin>>arr[i];
    int left =0,right = 0,sum=0;
    int len=N,leftlen=-1,rightlen=-1;
    while(right<=n)
    {
        sum+=arr[right];
        while(sum>=x)
        {
            if(right-left+1<len)
            {
                leftlen= left;
                rightlen = right;
                len=right-left+1;
            }
            sum-=arr[left++];
        }
        right++;
    }
    cout<<leftlen<<" "<<rightlen<<endl;
    
    return 0;
}